home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / mus / play / tracker_4_31.lzh / tracker / Makefile.os2 < prev    next >
Makefile  |  1995-05-19  |  8KB  |  300 lines

  1. # Makefile for any machine
  2. # - based on my newer makefile and the GREATE
  3. # modifications by Mike Battersby
  4. ###############################################################################
  5. #
  6. # CONFIGURATION OPTIONS
  7. #
  8.  
  9. # Choose your machine type. Possible types as of this version (4.11)
  10. # are
  11. #  hpalib, hplow, hp3, dec, solaris, sparc, linux, freebsd, sgi,
  12. #  soundblaster, aix, next, sbos2
  13. # GNU make needed to handle this file in FreeBSD or OS/2
  14. MACHINE = sbos2
  15. VERSION = 4.31
  16.  
  17. # The extension of the object and excutable files
  18. EXE = .exe
  19. O = .obj
  20.  
  21. # The name of your C compiler. For most machines this will be
  22. # either 'cc' or 'gcc'.
  23. CC = gcc
  24.  
  25. OPTS=-c
  26.  
  27. SHELL=bash
  28.  
  29. # User interface type. Right now, this is Unix as there are no alternatives.
  30. UI = OS2/
  31.  
  32. PREFIX=e:/users/bruno/tracker
  33. # Destination directory for tracker binaries and manpage.
  34. #
  35. # If you don't wish to use the 'make install' and 'make install.man'
  36. # commands, you can ignore these.
  37. BIN_DIR = $(PREFIX)/bin
  38. MAN_DIR = $(PREFIX)/man
  39.  
  40. # Where to put the compression methods description
  41. COMPRESSION_FILE=/users/bruno/tracker/compression_methods
  42.  
  43. # How to install the binaries and manpage. If you have a unix system,
  44. # use the GNU install program if you have it, otherwise try 'cp'. For
  45. # non-unix systems, make this the command for copying a file with the
  46. # following syntax
  47. #  <program_name> <source_name> <destination_name>
  48. #
  49. # If you don't wish to use the 'make install' and 'make install.man'
  50. # commands, you can ignore this.
  51. INSTALL = install
  52.  
  53. # Permissions and user/group id's to install with. Non-unix users
  54. # should comment these out (alternatively, you can use these to
  55. # provide arguments for the above $(INSTALL) program). If you want
  56. # to install tracker setuid root (which will allow it to renice
  57. # itself when non-root users run it), change the "-m 755" below to
  58. # "-m 4755". If you do so, you must be root to run make install.
  59. #
  60. # If you don't wish to use the 'make install' and 'make install.man'
  61. # commands, you can ignore these.
  62. INST_BIN_OPT = -c -s -m 755 -o root -g root
  63. INST_MAN_OPT = -c -m 644 -o root -g root
  64. ###############################################################################
  65. #
  66. # C compiler flags and libraries for each machine.
  67. # Unless you are porting this to a new architecture, you shouldn't
  68. # need to change these (on the other hand, if you understand what you
  69. # are doing, go ahead!).
  70. #
  71.  
  72. CFLAGS_next = -O3 -fomit-frame-pointer -funroll-loops -ffast-math -Wall
  73. LIBS_next   =
  74. AUDIODIR_next = NeXT/
  75. CONFIG_next = NeXT/
  76.  
  77. CFLAGS_hpalib = +O3 +OS +ESlit
  78. LIBS_hpalib   = -lAt -lAlib -lm
  79. AUDIODIR_hpalib=Hpux/
  80. AUDIONAME_hpalib=alib_
  81. CONFIG_hpalib = Hpux/
  82.  
  83. CFLAGS_hplow = -Ae +O3 -Wl, -a,archive -s
  84. LIBS_hplow=-lM
  85. AUDIODIR_hplow=Hpux/
  86. AUDIONAME_hplow=low_
  87. CONFIG_hplow = Hpux/
  88.  
  89. # yet another port to hp! This one might be the best yet.
  90. CFLAGS_hp3 = +O3 +OS +ESlit
  91. LIBS_hp3   = -lAt -lAlib -lm
  92. AUDIODIR_hp3=Hpux/
  93. AUDIONAME_hp3=3_
  94. CONFIG_hp3 = Hpux/
  95.  
  96. CFLAGS_solaris = -O
  97. LIBS_solaris   = -lm
  98. AUDIODIR_solaris=Sparc/
  99. CONFIG_solaris = Sparc/solaris_
  100.  
  101.  
  102. #CFLAGS_sparc = -g
  103. #CFLAGS_sparc = -O4 -Bstatic
  104. #CFLAGS_sparc = -g -D__USE_FIXED_PROTOTYPES__
  105. CFLAGS_sparc = -O2 -finline-functions -funroll-loops -Wall \
  106. -D__USE_FIXED_PROTOTYPES__ -static
  107. LIBS_sparc   = -lm
  108. AUDIODIR_sparc=Sparc/
  109. CONFIG_sparc = Sparc/
  110.  
  111. CFLAGS_dec = -O
  112. LIBS_dec   = -lm -lAF
  113. AUDIODIR_dec=AF/
  114. CONFIG_dec = AF/dec_
  115.  
  116. CFLAGS_sgi = -j -O
  117. LIBS_sgi   = -laudio -lm
  118. AUDIODIR_sgi=Sgi/
  119. CONFIG_sgi = Sgi/
  120.  
  121. CFLAGS_soundblaster = -O
  122. LIBS_soundblaster   = -lm
  123. AUDIODIR_soundblaster=Soundblaster/
  124. CONFIG_soundblaster = Soundblaster/
  125.  
  126. CFLAGS_linux = -N -O2 -funroll-loops
  127. LIBS_linux   = -lm
  128. AUDIODIR_linux=PCux/
  129. CONFIG_linux = PCux/linux_
  130.  
  131. CFLAGS_freebsd = -O2 -funroll-loops -finline-functions
  132. LIBS_freebsd = -lm
  133. AUDIODIR_freebsd=PCux/
  134. CONFIG_freebsd = PCux/freebsd_
  135.  
  136. CFLAGS_aix = -O
  137. LIBS_aix = -lm
  138. AUDIODIR_aix = Aix/
  139. CONFIG_aix = Aix/
  140.  
  141. CFLAGS_sbos2 = -O2 -ZC++-comments -Zomf -D__OS2__
  142. LIBS_sbos2   = -lm
  143. AUDIODIR_sbos2 = SBOS2/
  144. CONFIG_sbos2 = SBOS2/
  145.  
  146. CFLAGS_NAS = -O -I/usr/X11R6
  147. LIBS_NAS = -lm -L/usr/X11R6/lib -laudio -lX11
  148. AUDIODIR_NAS = NAS/
  149. CONFIG_NAS = NAS/
  150.  
  151. CFLAGS_SVR4 = -O -I/usr/X/include
  152. LIBS_SVR4 = -L/usr/X/lib $(LIBS_NAS) -lsocket -lnsl -lc /usr/ucblib/libucb.a
  153. AUDIODIR_SVR4 = $(AUDIODIR_NAS)
  154. CONFIG_SVR4 = $(CONFIG_NAS)
  155.  
  156.  
  157. CFLAGS = $(CFLAGS_${MACHINE})
  158. COPTS = $(OPTS) $(CFLAGS)
  159. LIBS = $(LIBS_${MACHINE})
  160. CONFIG = Arch/$(CONFIG_${MACHINE})
  161. AUDIODIR = Arch/$(AUDIODIR_${MACHINE})
  162. AUDIONAME = $(AUDIONAME_${MACHINE})
  163. AUDIO = $(AUDIODIR)$(AUDIONAME)
  164.  
  165. OBJ_TRACKER = main$O $(AUDIO)audio$O st_read$O commands$O \
  166. resample$O automaton$O st_play$O getopt$O open$O tools$O \
  167. dump_song$O setup_audio$O notes$O display$O empty$O \
  168. $(UI)ui$O prefs$O tags$O autoinit$O color$O version$O
  169.  
  170. OBJ_ANALYZER = analyzer$O st_read$O open$O dump_song$O tools$O notes$O \
  171. prefs$O autoinit$O ${UI}ui$O display$O empty$O color$O version$O
  172.  
  173. OBJ_SPLITMOD = split$O tools$O st_read$O dump_song$O open$O notes$O \
  174. display$O prefs$O autoinit$O $(UI)ui$O empty$O color$O version$O
  175.  
  176. all:    version.c config.h tracker$(EXE) randomize$(EXE) tcheck$(EXE) splitmod$(EXE)
  177.  
  178. config.h: $(CONFIG)config.h Makefile
  179.     cp $(CONFIG)config.h config.h
  180.  
  181. version.c: Makefile
  182.     echo >version.c char \*VERSION=\"${VERSION}\"\;\
  183.  
  184. install:
  185.     $(INSTALL) $(INST_BIN_OPT) tracker$(EXE) $(BIN_DIR)
  186.     $(INSTALL) $(INST_BIN_OPT) randomize$(EXE) $(BIN_DIR)
  187.     $(INSTALL) $(INST_BIN_OPT) tcheck$(EXE) $(BIN_DIR)
  188.     $(INSTALL) $(INST_BIN_OPT) splitmod$(EXE) $(BIN_DIR)
  189.     [ -f ${COMPRESSION_FILE} ] || \
  190.         $(INSTALL) $(INST_MAN_OPT) compression_methods ${COMPRESSION_FILE}
  191.  
  192. install.man:
  193.     $(INSTALL) $(INST_MAN_OPT) man/tracker.1 $(MAN_DIR)/man1/tracker.1
  194.  
  195.  
  196.  
  197. devel:
  198.     -rm -f $(BIN_DIR)/dtracker$(EXE) #$(BIN_DIR)/splitmod
  199.     cp tracker $(BIN_DIR)/dtracker$(EXE)
  200. #-    cp splitmod $(BIN_DIR)/splitmod$(EXE)
  201.  
  202. tracker$(EXE): ${OBJ_TRACKER}
  203.     ${CC} -o tracker$(EXE) ${CFLAGS} ${OBJ_TRACKER} ${LIBS}
  204.  
  205. dtracker$(EXE): ${OBJ_TRACKER}
  206.     ${CC} -o dtracker$(EXE) ${CFLAGS} ${OBJ_TRACKER} ${LIBS}
  207.  
  208. tcheck$(EXE): ${OBJ_ANALYZER}
  209.     $(CC) -o tcheck$(EXE) ${CFLAGS} ${OBJ_ANALYZER} ${LIBS}
  210.  
  211. randomize$(EXE): randomize.c
  212.     $(CC) -o randomize$(EXE) ${CFLAGS} randomize.c
  213.  
  214. splitmod$(EXE): ${OBJ_SPLITMOD}
  215.     $(CC) -o splitmod$(EXE) ${CFLAGS} ${OBJ_SPLITMOD} ${LIBS}
  216.  
  217. main$O: main.c song.h
  218.     $(CC) ${COPTS} main.c
  219.  
  220. tools$O: main.c
  221.     $(CC) ${COPTS} tools.c
  222.  
  223. $(AUDIO)audio$O: $(AUDIO)audio.c Arch/common.c
  224.     cd $(AUDIODIR); $(CC) -I../.. ${COPTS} $(AUDIONAME)audio.c
  225.  
  226. $(UI)ui$O: $(UI)ui.c
  227.     cd $(UI); $(CC) -I.. ${COPTS} ui.c
  228.  
  229. split$O: split.c
  230.     $(CC) ${COPTS} split.c
  231.  
  232. open$O: open.c Makefile
  233.     $(CC) ${COPTS} -DCOMPRESSION_FILE='\"${COMPRESSION_FILE}\"' open.c
  234.  
  235. resample$O: resample.c
  236.     $(CC) ${COPTS} resample.c
  237.  
  238. automaton$O: automaton.c song.h channel.h
  239.     $(CC) ${COPTS} automaton.c
  240.  
  241. getopt$O: getopt.c getoption.h
  242.     $(CC) ${COPTS} getopt.c
  243.  
  244. player$O: player.c song.h channel.h
  245.     $(CC) ${COPTS} player.c
  246.  
  247. st_read$O: st_read.c song.h
  248.     $(CC) ${COPTS} st_read.c
  249.  
  250. st_play$O: st_play.c song.h
  251.     $(CC) ${COPTS} st_play.c
  252.  
  253. commands$O: commands.c channel.h song.h
  254.     $(CC) ${COPTS} commands.c
  255.  
  256. dump_song$O: dump_song.c
  257.     $(CC) $(COPTS) dump_song.c
  258. analyzer$O: analyzer.c
  259.     $(CC) $(COPTS) analyzer.c
  260. setup_audio$O: setup_audio.c
  261.     $(CC) $(COPTS) setup_audio.c
  262. notes$O: notes.c
  263.     $(CC) $(COPTS) notes.c
  264.  
  265. display$O: display.c
  266.     $(CC) $(COPTS) display.c
  267. color$O: color.c
  268.     $(CC) $(COPTS) color.c
  269.  
  270. prefs$O: prefs.c prefs.h
  271.     $(CC) ${COPTS} prefs.c
  272. tags$O: tags.c tags.h
  273.     $(CC) ${COPTS} tags.c
  274. autoinit$O: autoinit.c
  275.     $(CC) ${COPTS} autoinit.c
  276. empty$O: empty.c song.h
  277.     $(CC) ${COPTS} empty.c
  278. version$O: version.c
  279.     $(CC) $(COPTS) version.c
  280.  
  281. clean:
  282.     -rm -f $(OBJ_TRACKER) $(OBJ_ANALYZER) $(OBJ_SPLITMOD) randomize$O
  283.     -rm -f tracker$(EXE) randomize$(EXE) splitmod$(EXE) tcheck$(EXE) core
  284.     -rm -f tracker*.tar tracker\*.tar.Z tracker\*.lzh
  285.     -rm -f config.h version.c
  286.     find . -name \*.bak -exec rm {} \
  287.  
  288. export:
  289.     -rm tracker*.tar.Z tracker*.lzh tracker*.lha
  290.     cd ..; tar -cvof tracker/tracker-$(VERSION).tar -T tracker/arc.list
  291.     mv tracker-$(VERSION).tar /tmp
  292.     cd /tmp; tar xvf tracker-$(VERSION).tar
  293.     cd /tmp; lha a tracker-$(VERSION).lzh tracker
  294.     compress /tmp/tracker-$(VERSION).tar
  295.     cp /tmp/tracker-$(VERSION).lzh .
  296.     cp /tmp/tracker-$(VERSION).tar.Z .
  297.     rm -rf /tmp/tracker*
  298.  
  299. 
  300.